<!DOCTYPE html>
<html>

<head>
    <title>Example</title>
    <style type="text/css">
        /* 子代选择器  匹配body元素的任意直接后代(table,p)的直接后代(p的span),tr的直接后代th*/
        body>*>span,tr>th {
            border: thin black solid;
            padding: 4px;
        }
    </style>
</head>


<body>
    <table id="mytable">
        <tr><th>Name</th><th>City</th></tr>
        <tr><td>Adam Freeman</td><td>London</td></tr>
        <tr><td>Joe Smith</td><td>New York</td></tr>
        <tr><td>Anne Jones</td><td>Pairs</td></tr>
    </table>
    <p>I like <span>apples</span> and oranges.</p>
    <table id="othertable">
        <tr><th>Name</th><th>City</th></tr>
        <tr><td>Adam Freeman</td><td>London</td></tr>
        <tr><td>Joe Smith</td><td>New York</td></tr>
        <tr><td>Anne Jones</td><td>Pairs</td></tr>
    </table>
</body>

</html>